import Vue from 'vue'
import Router from 'vue-router'
import CommunityQuestionDeatil from '../components/CommunityQuestionDeatil/QuestionDeatil.vue'
import CommunityAskQuestion from '../components/CommunityQuestionDeatil/AskQuestion.vue'

Vue.use(Router)
    //history
export default new Router({
    mode: 'hash',
    routes: [{
            path: "/",
            name: 'main',
            component: () =>
                import ('components/home/main'),
            children: [{
                    path: '/',
                    name: 'entry',
                    component: () =>
                        import ('components/home/index')
                }, {
                    path: '/community',
                    name: 'community',
                    component: () =>
                        import ('components/home/content')
                }, {
                    path: '/pricing',
                    name: 'pricing',
                    component: () =>
                        import ('components/modules/pricings/pricing')
                }, {
                    path: '/help',
                    name: 'iHelp',
                    component: () =>
                        import ('components/modules/help/help')
                },
                {
                    //问题详情
                    path: '/community/questiondeatil',
                    name: 'CommunityQuestionDeatil',
                    component: () =>
                        import ('components/CommunityQuestionDeatil/NewQuestionDeatil')
                },
                {
                    //提问
                    path: '/community/askquestion',
                    name: 'CommunityAskQuestion',
                    component: CommunityAskQuestion
                },
                {
                    //企业应用商店
                    path: '/enterprise',
                    name: 'Enterprise',
                    component: () =>
                        import ('components/EnterpriseStore/Enterprise')
                },
                {
                    //企业应用详情
                    path: '/enterprise/deatil',
                    name: 'EnterpriseDeatil',
                    component: () =>
                        import ('components/EnterpriseStore/EnterpriseDeatil')
                },


            ]
        }, {
            path: "/register",
            name: "register",
            component: () =>
                import ('components/login/register')
        }, {
            path: '/download',
            name: 'iDownload',
            component: () =>
                import ('components/modules/download')
        },
        {
            path: '*',
            name: '404',
            component: () =>
                import ('components/noResource/404')
        }
    ]
})